#include <bits/stdc++.h>
using namespace std;
int sum[100005];
int h[100005];
int n = 0, x = 0;
bool check(int mid) {
    for (int i = 1; i + mid <= n; i++) {
        if (sum[i + mid - 1] - sum[i - 1] < 2 * x)
            return false;
    }
    return true;
}
int main()
{
    cin >> n >> x;
    int l = 1, r = n;
    sum[0] = 0;
    for (int i = 1; i < n; i++)
    {
        cin >> h[i];
        sum[i] = sum[i - 1] + h[i];
    }

    while (l < r)
    {
        int mid = (r - l) / 2 + l;
        if (check(mid)) r = mid;
        else l = mid + 1;
    }

    cout << l << endl;
    return 0;
}